package top.lshaci.learning.singleton;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;

/**
 * StaticCodeBlock
 *
 * <pre>
 *     静态代码块 - 饿汉式
 * </pre>
 * @see StaticConstants
 *
 * @author lshaci
 * @since 1.0.0
 */
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class StaticCodeBlock {

    private static final StaticCodeBlock singleton;

    static {
        singleton = new StaticCodeBlock();
    }

    public static StaticCodeBlock instance() {
        return singleton;
    }
}
